1. Field of the Invention
The present invention relates to a keyboard apparatus and more specifically to a keyboard apparatus of a scan type in which a plurality of key switches are arranged in the form of a matrix.
2. Description of the Prior Art
In general, in the keyboard apparatuses of that type, various keys are disposed on a keyboard for inputting letters, numeric characters, symbols, etc. The keyboard apparatus includes circuitry to which key switches are interconnected in association with those keys at intersections between scan lines and return lines to form a matrix structure. In general, in the keyboard apparatus, a software system for a microprocessor is employed to achieve a scan control to sense a key operation made by the operator so as to transfer data representative of the operation to a main device or system such as a main processor. In this specification, the words "key depression processing" refer to the circumstances under which the keyboard apparatus transfers to a host processor data representing a depressed key.
In the keyboard apparatus, for example, when three adjacent keys are depressed at the same time, a phantom switch condition occurs. As a result, key switches which are disposed next to these three keys and not actually depressed could be determined as depressed keys in some cases. In order to remove the disadvantage, there has been a conventional technology in which diodes are correspondingly connected to the key switches to prevent a reverse current from flowing in an opposite direction, thereby avoiding the phantom switch condition. However, in accordance with the prior art, since the reverse current preventing diodes are required to be disposed for the respective key switches, the configuration of the keyboard apparatus is further complicated, which in turn increases the size and cost thereof.
In order to remove the disadvantages, for example, the Japanese Patent Laid-Open Publication No. 62-135919/1987 and the U.S. Pat. No. 4,420,744 entitled "Keyboard Crosspoint Encoder Having N-key Rollover" disclose prior art in which without using the reverse current preventing diode, the key depression processing is achieved for keys actually depressed.
For example, in accordance with the prior art disclosed in the Japanese Patent Laid-Open Publication No. 62-135919/1987, when a key switch depression is sensed in a column or row of a key matrix, a confirmation is made to determine whether or not two or more key switches are depressed in the column or row, thereby deciding whether or not the key depression processing is to be executed. Namely, in this conventional technology, when two or more keys are depressed in a column or row, the apparatus determines whether or not there exists two or more depressed keys in the row or column where the depressed keys are found, thereby judging a possibility of the phantom switch condition. If such a possibility is involved, then the key depression processing on the pertinent key is not executed.
More specifically, in a first period of time, when a key state sense scan is performed, a horizontal register is established for indicating whether or not two or more depressed keys are found in a row or column of the key matrix. Furthermore, results from the sensing scan are stored as a present or current key state in the register. In a second period of time, the contents of the horizontal register are ANDed to produce a logical product with the current key state obtained at the same time so as to determine whether or not the phantom switch condition appearing in a case where three or more keys are simultaneously depressed is involved.
However, in accordance with the prior art, since the horizontal register and the present key state obtained at the same time when the horizontal register is produced are ANDed, the present key state is required to be kept stored in the register up to the second period of time. In consequence, there has been a problem that a register of large capacity and a buffer associated therewith are necessary and hence the size and cost of the apparatus are increased. That is, in a keyboard apparatus of this conventional technology, for example, in the case of a key matrix having 8 columns.times.16 rows=128 key switches, there are required a 16-byte register (one bit for each key) to store the current key state and a 32-byte register (two bits for each key) to store the key state obtained by the previous scan.
In the keyboard apparatus in accordance with the prior art, in association with the register for storing the current key state, there are required a key data transmission buffer (e.g. 16 bytes for 16 keys) and many registers such as a command processing register for processing a command sent from the main system connected to the keyboard apparatus, registers for controlling attributes of key switches specified by the command (e.g. 128 keys.times.2 bits), a register for storing data supplied by a repeat key, a register for storing a count of the data, and general registers for general-purpose processing. The registers for controlling attributes of a key switch are employed to control data representative of key attributes which are associated with the key switch functions managed by a host system and include (1) an indication of transmitting key data only in response to key depression, (2) an indication of transmitting key data in response to both key depression and key release, (3) an indication of provision or absence of the repeat function, and (4) a void or invalidation key representation.
As described above, a large number of registers are necessary in the keyboard apparatus of the prior art. The keyboard apparatus is primarily controlled, in general, by a control circuit having a microprocessor or the like, which includes storage locations of a random access memory, RAM, are allocated for the registers mentioned above. Consequently, the memory capacity of the internal RAM of the microprocessor becomes insufficient in some cases. To overcome this difficulty, it is necessary to adopt a microprocessor having a large RAM capacity or to dispose an extended or external RAM as a separated unit in addition to the microprocessor. When the external RAM is employed, there are required attached circuits such as an integrated circuit, IC, for controlling a CPU bus in addition to the external RAM. In consequence, these systems cause the cost of the circuit constitution to soar.
Consequently, in order to prevent a ghost key from being sensed due to the phantom switch condition in the conventional keyboard apparatus, an expensive circuit configuration is to be inevitably employed. This resultantly leads to a disadvantage that the constitution is complex and the cost of the apparatus is increased.